package com.example.service.impl;

import com.example.dao.OrderDao;
import com.example.domain.Orders;
import com.example.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;
@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderDao orderDao;
    @Override
    public List<Orders> selectpage(int pageCount, int pageSize) {
        return orderDao.selectpage(pageCount,pageSize);
    }

    @Override
    public int selectcount() {
        return orderDao.selectcount();
    }

    @Override
    public int selectcount1(Long UserId) {
        return orderDao.selectcount1(UserId);
    }

    @Override
    public void save(Orders orders) {
        orderDao.save(orders);
    }

    @Override
    public List<Orders> selectall(Long userId, int pageCount, int pageSize) {
        return orderDao.selectall(userId,pageCount,pageSize);
    }

    @Override
    public Orders selectbynumber(int pageCount, int pageSize, String number) {
        return orderDao.selectbynumber(pageCount,pageSize,number);
    }

    @Override
    public List<Orders> selectpagebytime(int pageCount, int pageSize, LocalDateTime beginTime, LocalDateTime endTime) {
        return orderDao.selectpagebytime(pageCount,pageSize,beginTime,endTime);
    }

    @Override
    public Orders selectbynumberandtime(int pageCount, int pageSize, String number, LocalDateTime beginTime, LocalDateTime endTime) {
        return orderDao.selectbynumberandtime(pageCount,pageSize,number,beginTime,endTime);
    }
}
